Photocell with background suppression