Photoelectric sensor for transparent bottles