Optical detection by suppression of the gap voltage in niobium junctions