Meaning : With optimism. In an optimistic manner.
Example :
`We have a good chance of winning,' he exclaimed optimistically.
With pessimism. In a pessimistic manner.
He evaluated his chances for survival rather pessimistically.