It is single slot so the BTX orientation of the Optiplex won't be a problem, and it will run off the 75 watts provided by the pci-e slot.
You won't get monster frame rates, but at low resolutions and low textures it should be able to play nearly everything on it (BF3, Diablo3, Skyrim, Crisis, etc). Less demanding games will run much better obviously.
And I disagree with Sinister. They don't "Generate a ton of heat". They are very efficient because of the BTX layout and the power efficient cpu (65 watts). I've found the power supplies to be reliable and of good quality. Plus these machines are ridiculously inexpensive these days.
I guess it would depend on the desktop version. We use SFF 745, 755, 760, 780, and 790. The 745s are P4, while the 755/760/780 are Core2. The 745s generate a ton of heat. It's killed numerous PSUs and HDDs because of that factor. The tower versions may be better with heat.
I still wouldn't put a gaming video card in it, though.