The air vents out from the back, not through the keyboard so it's okay to use the macbook in clamshell mode.
That's with the iBook, but not the Macbook.
Phungy.. I said air INTAKE.
Eraserhead.. Not sure about the iBook, but convinced about the macbook. Get the CPU fan running high and put you hand over the keyboard. You can feel the air passing through your fingers.
If Apple have already said somewhere on the site or in some manual that its ok, then I would imagine thats is fine. edit: (in clamshell mode)