Optical measurements on the nanometer scale