To actually answer your question, no I'm not sure you could shave your head .40. I'm assuming you meant .040", since .40 is almost 1/2 inch, and would probably chop off the bottom of the valve seats.
And yes, you could shave the head .040" run on pump gas. If you're looking for real power, get HC pistons AND shave the head.