Simple setting to keep Wi-Fi Internet access and to temporarily disable iPhone 3G data access to reduce bandwidth/price overflow:
Go to Settings --> General --> Network --> Cellular data network --> APN
Change/rename the APN value or appended the value ".bak" at the end of your APN code
Repeat all and remove the .bak to restore the original value and to restart using iPhone 3G data service.
At the risk of making life harder, the new iOS4 for the iPhone 4 also runs on the iPhone 3G and 3Gs. One of the features of the new OS is the ability to turn off Cellular Data in the Network Section indicated above.
Be warned, iPhone 3G owners have been having issues with the new Software slowing their phones down. 3Gs speed is ok but can make the phone flaky. If you're unsure don't upgrade it.