Near Field Control Of Optical Wavefronts