Oh yeah. This is definitely possible. I will warn though, it becomes very easy to "accidentally" turn off the box when you don't want to.
This is the easiest way (I think):
First set the /sbin/shutdown SUID (this lets you issue a shutdown without needing to use sudo)
See this post for info on how to do this:
Next, you need to add an additional command to your ~/.lircrc
That button may be a little different, check your /etc/lirc/lircd.conf to verify that is what your power button is called.
prog = irexec
button = power
config = shutdown -h now
Log out and back in. Irexec is automatically started when you log in.
Press your button and go.