Tour the school and see how you like it. If you do, then go for it and save a bunch of money at the same time. I'm not sure how much more you'll fit in at UCI, but you don't have to worry about your chances decreasing. Just make sure you're happy about where you are and do well while you're there.
I too am from Orange County and went to UCLA but took many summer courses at UCI and completed post bac work at UCI after graduating. In terms of academics, UCI and UCLA are very similar. The science majors are highly impacted, impersonal and very competitive. I found a couple courses at UCI to be a little easier but I think a lot of it had to do with professors I had. Put simply, they were just better professors (for example: I took microbio at UCI w/ an amazing professor who only teaches the course in the summer.. I did well in it because she was a great professor who really liked teaching). At UCLA however, the microbio lecture and lab series is known to be very horrible! My friends that took the class said that their professors were just terrible, so I opted to take it at UCI.
To answer your question: transferring from UCLA to UCI shouldn't decrease your chances for entrance into optometry school. As long as you keep your grades high (which seems feasible with your 3.9 gpa!), score well on the OAT and get involved in the field.. you should be just fine. However, as stated by previous posts, do your research before committing to such a change. Take a tour of the campus and maybe attend summer school there to get a good feel of how the next 3 years of your college experience is going to be. I HATED the UCI campus, sorry anteaters... but I think that the way the campus was constructed around Aldrich park is just terrrrrrible! I dreaded the long walks from one side of campus to the other! I actually found the academic/social environment at UCI to be even more impersonal that UCLA!
I STRONGLY URGE that you give UCLA another shot! If you're from So Cal, it really is just a quick drive to get home on the weekends. Even more so, your friends from OC should find it exciting to visit you in LA every now and then. I found Westwood to be such a great city of culture and diversity. The city itself embodies the full essence of a college town. If you find yourself lonely.. make an effort to join one of the many clubs and organizations available on campus (browse studentgroups.ucla.edu). Since you're interested in optometry, UCLA is home to one of the most innovative eye research institutes (the Jules Stein Eye Institute).. so try volunteering as a research associate for one of the optometrists there! At my SCCO interview, they asked me specifically about my research and volunteer work at UCLA.
While I also considered UCI when choosing my undergraduate college, nothing could replace my experience at UCLA. This is just my own humble opinion: but UCI doesn't offer the exciting perks of pac-10 school like UCLA! I'll never forget the Beat SC pep rallies, homecoming parades, football games, basketball games (if you didn't know.. we're pretty damn good!). Also, when you become of age by your third year.. you might find Westwood/LA nightlife to be pretty exciting as well. Trust me, I live and work in Irvine now and I find it to be quite less exciting.
Sorry for the long reply, but I wanted to give you the perspective of someone who's been on both ends of the spectrum. Let me know if you have any questions! Best of you luck to you =)