What seems to work is:
Forbid all bolts that you want them to use for combat, and only unforbid those when enemies are on the map.
Now if you go to your (m)ilitary >> ammuni(f)ion screen, you can assign wooden bolts to be used both for training as well as combat, and metal bolts for combat only.
For some reason setting bone/wooden bolts to training only seems not to work very well.
Note that commands on (m)ilitary subscreens are case-sensitive, so for example, capital M for material setting.
You might want to also use bone bolts though, unless you like mass deforestation. Archery training works so darn well, my 2 marksdwarves can easily use up all bolts my 2 bonecrafters are making on repeat.
Now. If you have an archery range set for training, your marksdwarves will do a LOT of archery practice when set to "No scheduled order" as well as "Training". They'll burn through your training bolts like crazy. Whenever enemies arrive, unforbid the metal ammo. Your marksdwarves should grab some, cause most of the time, their quivers can hold more, cause of how fast they empty them when training, and they will prefer metal bolts over bone bolts.
Once they've grabbed some metal bolts (which can be very fast if you make sure the ammo stockpiles are near their training area) they're ready to send out.
They'll first use up any remaining training bolts in their quiver, I think, before reaching the metal bolt stack, but there shouldn't be many of those left. AFAIK training bolts can still damage enemies, unless df2014 changed that drastically.
When the enemies are gone, you might have trouble getting them to train again. Allowing metal bolts for training temporarily (after forbidding any that have not been quivered in the battle), so they'll use up the stack that they have quivered, should reset things back to training mode.