Wavelength and intensity sampling of optical signals using semiconductor optical amplifiers