Photoelectric sensor, information recording system and method for recording information