I think you're confusing optimism with perfect and Utopian. Having bad guys in Starfleet doesn't make the show/movie less optimistic or some sort of Dystopia.
That is true. The Federation and Starfleet have overcome the bad apples to remain true to their mission (except for the cynical Section 31 which appears to always be a necessary aspect). But Star Trek - the TV show and movies - are commonly described, and sometimes self-described, as being set within a utopian society. It still surprises me to see fans deny such a common point of view that Star Trek is about optimism and the hope for a more perfect society. It's seems like a bit of pessimistic cognitive dissonance to me, or maybe just ironic.
Oops, sorry for the double post.
First of all, this is a rather long post, and it is not meant to be a personal attack in any way.
As others have pointed out, the idea of optimism does not preclude conflict among members, especially in TOS, which Abrams Trek is inspired by. Regardless of GR's view on the Federation
later on in Trek's life, the early ideas of a peaceful Federation was not one of
perfection but cooperation. Humanity had managed not to blow itself up, and had worked out space travel and cooperation with alien worlds.
Even in TOS, there is conflict among the crew members, among citizens of the Federation and between member worlds of the Federation. Spock talks about some citizens being discontented with the way life is planned out in the Federation. Sisko, rather famously, talks about the problem of Earth, versus living out on the frontier:
"On Earth, there is no poverty, no crime, no war. You look out the window of Starfleet Headquarters and you see paradise. Well, it's easy to be a saint in paradise, but the Maquis do not live in paradise. Out there in the Demilitarized Zone, all the problems haven't been solved yet. Out there, there are no saints — just people. Angry, scared, determined people who are going to do whatever it takes to survive, whether it meets with Federation approval or not!"
Yes, I understand that GR had his vision of the Federation, and humans specifically, evolving to a point that things like death and personal conflict did not occur. I understand that, and, while I do not agree, I can see why GR would come to that conclusion and want that to happen.
However, one aspect of science fiction (SF from here on) is to study humanity's reaction to new technology and to new events that occur in that world. A quick side note is that the show Deadwood, and even Dr. Quinn could be argued to be SF to some degree, due to this fact.
Abrams Trek shows us a different view, one that, in my opinion, has a more modern sensibility. It isn't less optimistic-I would argue that Kirk's arc is all about him reaching his full potential. But, that optimism is getting challenged by forces that Kirk's era never had to deal with. The constant threat of a Romulan attack, the rising hostilities with the Klingons, and the need to prepare for facing those attacks. The result is one of contrasts: you can become more like Marcus, who reflects the negative extreme, or become like Kirk, who decides to embrace an optimism that war is not inevitable, nor does it require resorting to extreme measures to combat it.
Sorry for the long post, but I see ID reflecting far more optimism that it is
ever given credit for. Maybe the means of conveying that message is lost in the style of the film and that isn't for everyone. I'll grant that. But, that doesn't make it less Star Trek, just because it uses a different way of making its point.