I don't know how this feature works in iOS 5.1.1 but tap Settings>Accessibility>Assistive Touch.
When the dark square appears on your iPad's screen tap it, press Device and then press and hold "Lock Screen."
With any luck you'll be able to power down your device.