Fourier optics for wavefront engineering and wavelength control of lasers