I'm not talking about the 'offscreen' deaths. I'm talking about the onscreen ones where powerful Jedi Masters are caught completely offguard and gunned down by 3 or 4 troopers. Aayla Secura, Ki Adi Mundi, etc.
Made worse by the fact that Lucas has explicitly stated that there was no 'special programming' in the Clones of any kind, so can't pass it off as some kind of switch going off in their heads that the Jedi couldn't have predicted.
I'm not sure why special programming would be required in any event. Both the masters you cited were surrounded by more than three or four clones, but by dozens, with armor clearly visible in the background. Had Secura slaughtered the troopers around her, she'd have been easily killed by the artillery just a bit further back. Had Ki Adi Mundi turned on the marines closest to him, there were countless more along the bridge, and countless droids on the other end of it.
Further, and I think more relevant, you're underestimating the factor of surprise; if the Jedi is so surprised by the betrayal that they spend a second or two stunned by it, then they've used up their advantage. If instead of slaughtering the clones instantly, the way Yoda does, the masters think, "Wait, they're turning on me?" then they're dead.
Really, the bit of that whole movie that really, really bothers me every time is part where after the temple, the clones are for some reason running towards Yoda and Kenobi. Seriously... you've got guns, even if they weren't Jedi, why would you move towards them? If they were droids, or other clones, or anything else, why would you ever run towards them? You wouldn't. So why would you run towards the only guys who can't hit you from far away?
All of which is horribly off topic, and so I apologize.