Fiber optic sensor to detect nitrite and nitrate in water