G'day
D&D I'm not so sure about, since in D&D so much depends on knowing details about features of the D&D game world, such as what particular spells, objects, feats, and monster can do. But in a game world with less special content, a world that is more like the real world or more like the world of a well-known fantasy, it is certainly possible to GM without formal preparation. I used to undertake to run an adventure in my usual fantasy setting, my usual SF setting, the present day, the 'Sixties spy genre, or the 'Twenties given fifteen minutes notice.
I guess this is a function of familiarity and practice. Once you become sufficiently familiar with the monsters, spells, and feats it is probably possible to run a 3E adventure with no more preparation than it takes to think of a skeletal plot. (This is the reason that I as a GM dislike the constant issue of supplements containing new monsters, spells, classes, and feats: they impose a burden of continual learning. I much prefer supplementary materials that contain rule-free setting information.)
Regards,
Agback