The paper proposes a quantum theoretical formulation of an optical near-field system based on the projection-operator method. Special attention is paid to a nanometric probe tip-quantum mechanical sample system, whose interactions are essential for describing such phenomena as atom guidance and manipulation, or local excitation of a single quantum dot. The relationship to the virtual photon model--an intuitive model--is discussed, and the latter's empirical assumption of the Yukawa-type interaction between probe and sample is justified theoretically. Several applications of the theory are briefly outlined.