The film's official novelisation indicates that the Jedi Temple was lightly defended at the time of the attack, with the majority of active Jedi Knights and Masters off-world directing clone troopers in battle.
There are a couple of scenes in the book that don't appear in the film:
- The Jedi placed the Temple into lockdown
“Master Ti and Gate Master Jurokk will direct the Temple’s defense,”
he said as he reached the others. “We are shutting down all nav
beacons and signal lights, we have armed the older Padawans, and all
blast doors are sealed and code-locked.” His gaze swept the Masters.
“It’s time to go.”
- Anakin Skywalker betrayed the Gate Master (and opened the main door)
Gate Master Jurokk sprinted through the empty vaulted hallway,
clattering echoes of his footsteps making him sound like a platoon.
The main doors of the Temple were slowly swinging inward in answer to
the code key punched into the outside lockpad. The Gate Master had
seen him on the monitor. Anakin Skywalker. Alone.
Jurokk looked past him now. The night beyond the Temple was full of
clones. Battalions of them. Brigades. Thousands.
“Anakin,” he said slowly, “what’s going on? Something’s happened.
Something horrible. How bad is it-?”
The last thing Jurokk felt was the emitter of a lightsaber
Presumably then, the Jedi Temple Guards were slaughtered by the thousands of troops at Anakin's command.