Photosynthetic constraints on the habitable zone