An optical receiver has a voltage supply, a first node, and a second node. A first input of a differential amplifier is coupled to the first node and a second input of the differential amplifier is coupled to the second node. A photodetector is coupled between the voltage supply and the first node, which produces a photodetector capacitance. A programmable variable capacitor having a capacitance selectively matched to the photodetector capacitance is coupled between the voltage supply and the second node.