The simplistic answer is, yes, one can give a good speech without preparing for that particular instance. For example, the idea behind an extempore is to give a good speech without preparation.
However, my experience has taught me that excelling even in extempore is a matter of practice. Being prepared for the unprepared, whereby one can keep the mind sharp enough to link a given unprepared topic to a known experience, is the key to delivering a good speech. So while one may not have prepared for that particular speech, definitely some level of preparation needs to have been there.
In rare cases, a person is naturally talented enough to gives speeches with no preparation at all, just like natural artists perform with little/no practice. Even there, excellence is achieved only through practice.