Can I use Wi-Fi with the iPhone in airplane mode?

Yes, it's possible to use Wi-Fi with the cellular radio off. To enter airplane mode:

Touch Settings -> Airplane Mode ON

This turns off all radio activity including cellular antennas and Wi-Fi. Now while staying in airplane mode you can turn on Wi-Fi only.

Touch Settings -> Wi-Fi -> Wi-Fi ON

Your iPhone will now use the Wi-Fi connection while keeping the EDGE and 3G radio off.