The problem is ophthalmology is merely a 2 week elective rotation that’s not required and usually taken around the time you’re in the middle of applying to the programs. So either you need to know you want to do ophthalmology as soon as possible or you’re fucked. Too bad if you discover you love it during that rotation.
Unfortunately, you are often at the mercy of how much elective time your school provides and if they let you do subspecialty rotations on your surgery rotations. Our biggest recommendation is to start thinking about what you want to do at the beginning of medical school and seek out shadowing opportunities to at least get a feel for specialties. Then you can be a little more informed about picking electives. If you discover something late there is always the option to delay applying by a year and do a research year or an intern year in the interim.