Some might think it's a bit early to be asking questions like this, but I think it's a good idea. In my case I finished undergrad, and wasn't sure that I wanted to go to med school until after I spent a few years working for an ophthalmologist. One thing I didn't really understand even as I was starting med school is that there is no guarantee that one will secure a residency spot in the specialty of his or her choice - especially if it is in a competitive area like ophthalmology. Realizing this toward the beginning of med school made the process a bit more stressful, but in retrospect also provided me with a bit of an advantage in being able to do the things necessary to improve my chances to get a spot in ophthalmology.
From what I understand the vast majority of people that start an ophtho residency will complete it. At one program I rotated at one attending could recall only one person during their long time at that institution that despite focused attempts on the part of the faculty to work with that person - he simply could not master certain surgical techniques and ended up sort of being ushered into another field.
Not everyone will agree with this, but my advice is that unless you're the type of scholastic superstar high achiever to which everything comes very easily, at least explore some other fields in medicine to consider if you could be happy if ophthalmology doesn't work out. I think most people could, but just a thought if you're really going into this strictly for ophthalmology.
Secondly, as excited as I am about my future in ophthalmology, these days I'm advising premeds I care about to get some exposure to dentistry. Part of this may stem from my current state of slogging myself through an exceedingly busy intern year at the moment half awake while my significant other (in a dental residency) works hard but is perpetually well rested and never on call - and after fewer years in training potentially headed toward a career with better pay for less work. With that said I would choose med school again 100x if I had to. My point is not that dental school is better or anything ridiculous like that, but just that I notice that a lot of people (myself included) develop an identity very early on as "premed" and pursue it somewhat blindly. Part of this is by necessity because its very difficult to understand what the practice of medicine will really be like for you until you're a bit further along in the process. Why would I choose med school again? Because I love eyes. But if someone finds out they love teeth as much as I love eyes - it's not a bad way to go. Good luck.