Yes, should not be any problem. You just plug it in using a mini-DVI to DVI adapter or a mini-DVI to VGA adapter, and then plug in the keyboard and mouse, close the MacBook, and wake it using the keyboard and mouse. If you are using a wireless kb/mouse (BT), then you need to check settings in system preferences allowing for wake on bluetooth (it's in the Bluetooth pane, and not the energy saver pane). That's it. Very easy.
The only other thing you may have to do is configure the screen resolution the first time you use it. Typically it's quite good at auto-configuring, though.
The MacBook can also run with the screen open and drive two different displays on the two screens, if you wish.