Efficient and selective cavity-resonant excitation for single photon generation