Acoustooptic tunable filter is used to compensate for the gain spectrum variations in multiwavelength lightwave systems containing cascaded fiber amplifiers. Demonstrations of such systems using a circulating loop containing a fiber amplifier and an acoustooptic tunable filter have shown that differential gain compensations of up to 14 dB can be achieved for two arbitrary injected wavelengths.