Let's remember why people turn off the safeties, folks. Ten times out of ten, it is for the purpose of experiencing an adrenaline rush from the awareness that injury or death lurks around the corner.
Surely the holodeck AI would understand this. So an order to "turn off the safeties" would be taken as intended: the holodeck doesn't just stop pampering the user, it actually actively puts him or her at mortal risk. That's what he or she wanted with the order, after all.
Building a machine that can do things like that is perfectly reasonable if one assumes one or two things: that the users are mature people who have every right to commit self-injury or suicide if they want to, and that the holodeck becomes a more useful training tool for the Federation's de facto military arm if it has a life-threatening aspect to it.
So I'd not sweat the details of how one can get injured when safeties are off. The original question is the more interesting one: can the safeties always protect the user? Considering the spectrum of magic available to the holodeck for creating the illusions, I'd argue that all situations can be made completely survivable in the mechanistic sense. Even if the rest of the ship explodes, the holodeck could erect protective forcefields and inertia nullifiers as the last line of defense; even if a deadly chemical permeates the ship, the holodeck could replicate and insert the required counterchemicals while holding back the intruding agent with suitably semipermeable barriers of all sorts.
It all boils down to the initiative and intelligence of the controlling AI, then. Can it have "blind spots" that allow for death? Probably it can. But even if death does occur, one would assume it would be reversible: the holodeck should be able to quickly reproduce the finest services UFP medicine can offer, such as replicating the required drugs directly at the required parts of the body, performing rapid surgery, or creating a set of temporary lungs or midbody so that the remaining body parts can be stitched together. And if a tiny tissue fragment of a transporter user, combined with some sort of a recent transporter pattern of him or her, can be used to recreate a body that was damaged either inside or outside the transporter process ("The Lonely Among Us", "Unnatural Selection", "Rascals" et al.), then the holodeck, constantly involved in transporter magic of all sorts, might well pull off a "Game over - shall I restore the user from last save?" trick and bring back to live a use burned to crisp, flattened by a steamroller, cut to pieces and ground to dust in a peppermill by a live-action Itchy&Scratchy demolition team, and scattered to the winds.
Timo Saloniemi