Certainly not all writers are optimistic -- neither about the probability of getting published (unless they're well connected or are self publishing), nor about the probability of their work being positively received, nor about the probability that they will have something to write about in the future. In fact, many writers are NOT optimistic as reflected in their subject matter. It is certainly well known that Willam Styron, who wrote Sophies Choice, suffered from depression which he wrote about in Darkness Visible: A Memoir of Madness (Modern Library). Then there's Kafka, Dostoyefsky, Camus. Could they really have written about such dark topics if they had been optimistic?
Some writers believe that it is necessary to be depressed, and therefore not optimistic, in order to be productive as a writer. Yet, as psychological evidence has accumulated, it has become clear that depression is different from "the blues," and that depression interferes with creative productivity.
Still, there appears to be a stigma about writers seeing themselves as optimistic. And, those that are, are often thought to be writers are are "not serious" writers.
So, what can optimism add to the writer's toolkit? A belief in a writing future is number one. I've talked elsewhere (Overcome Writer's Block Easily) about the value of envisioning a future as a writer. It is one sure thing that can keep the writer and wannabe writer writing. Without a future vision, there is nothing propelling the writer forward. And, it is difficult to envision a writing future without optimism.
Optimism can be learned (Learned Optimism: How to Change Your Mind and Your Life, The How of Happiness). So you need not give up the goal of being optimistic if you know you are NOT optimistic currently. Being optimistic is something you can work at. As in writing, so with optimism, persistence pays off.