A three stage optical amplifier is disclosed having a substantially flat gain profile. The amplifier includes a variable optical attenuator coupled between second and third stages of the amplifier and a dispersion compensating element. The attenuation of the optical attenuator is adjusted in accordance with the loss across dispersion compensating element and the optical power input to the amplifier to thereby obtain a substantially flattened gain profile. An offset value can also be used to refine the variable optical attenuator control and minimize nonflatness. The first and second stages are preferably pumped to provide high gain and a low noise figure and the third stage is preferably pumped to provide a high optical conversion efficiency. In an additional example, received optical powers associated with each of the channels in a WDM system are monitored and the attenuators within each amplifier in the system are controlled so that the received powers are substantially equal.