For me, the optimism of Trek isn't due to lack of conflict, so much as the way that those conflicts are resolved. In Trek conflicts aren't solved by wiping out an enemy, but by finding a way to come to some kind of an understanding.
For an optimistic, positive view of the future, this is a pretty shallow one, rather superficial:
The method of resolving the conflicts changes absolutely nothing to all the death, suffering and destruction endured through the wars.
And the next large scale war/disaster/etc is always around the corner in trek lit these days.