Add to this that the shuttles of this type are quoted as having "ion engine power", in "The Menagerie".
(Or perhaps they have "duranium metal shell, ion engine, power-", as the list of qualities given by the computer is cut short by Spock at that point. But let's say there's an exotic power source aboard called an ion engine.)
We might argue that the shuttle is a miniature starship in every respect but one: it has batteries for general utility needs (perhaps including weapons and shields) plus igniting or otherwise tending for the other power systems; an impulse system providing takeoff thrust and utilizing fluid fuel (probably liquid, but only under pressure, as its leakage did not result in a puddle) as its energy source; and a warp system providing FTL capabilities - but in this case with "ion power" rather than "dilithium-regulated antimatter annihilation"!
Yes, yes, we know that polaric ion testing is banned, but ion drives still make Scotty's heart beat faster; perhaps ion power is fine for shuttlecraft, and only blows up entire civilizations when scaled up to starship or planetary power grid scale?
This way, the shuttle could make do without large fuel tanks, as the fluid energy source would only be needed for the rare takeoff and landing. The main drive would be a separate system. And although Spock claims that there's almost nothing they can dump and still retain takeoff ability, he wouldn't be considering dumping the space drive because unbolting it would be beyond their capabilities...
Now, perhaps they had lost most of their fuel, and had too little to fire up the takeoff engines, but still enough (uselessly sitting in the tanks) to create the flare. But they could use an alternate means of takeoff, sidestepping the takeoff engines altogether: they could feed raw energy into the space drive (let's just call it warp drive even if they never utter the words in TOS) and use its supposed gravity-negating properties to shoot up to the sky.
So, now Scotty can adjust the "main reactor" to use a substitute source of energy, even though he cannot do that with the takeoff engines. Phasers can provide the same format of power as the ion reactor (whose regular means of providing power may be knocked out because of all the ionic interference around). And thus they fly into space without using any of their regular takeoff fuel, meaning Spock is free to use that for making the flare. (And although he is not planning on using it for that purpose, he can't purge all of it to save weight, either - he can merely equalize pressure with the outside atmosphere, meaning a bit of that fluid is still left in the tanks for later use.)
It doesn't cover all the bases - but even if the corner of third base is left peeking a bit from under the pile of technobabble, I think it may do.