Highly selective excitation of atoms and molecules using two-photon processes