yes it can be jailbroken with redsn0w 0.9.5
here is a guide i coppied from the net
Steps to Jailbreak iOS 4.0.1 with Redsn0w 0.9.5
Step 1: Connect the iPhone 3G to your Mac using the USB cable.
Step 2: Run Redsn0w and click Browse. Select the Firmware 4.0 from the desktop of your computer and then click Next to continue.
Step 3: It will start an automatic process to patch the kernel.
Step 4: You will now have a new screen where you can select packages to install. Select Cydia and if we wanted to, also check to enable multitasking. You can also change the background to the springboard.
Step 5: You will be prompted to put the iPhone in DFU mode. To do so: Press the Home + Power for exactly 10 seconds then release the power button while continuing to press home only until a screen will appear all white. Another automated process will start to quickly run the jailbreak.
Step 6: When your iPhone3G comes back up, you’ll notice Cydia has a blank white icon. You’ll also notice Cydia has no sources.
Step 7: Go to the Sources panel and add this repo: http://apt.saurik.com/cydia-3.7. Make sure that you have a carrier or wifi signal.
Step 8: After Cydia restarts, its real logo now appears, and the standard sources should be ready to use.
Voila! You have successfully jailbroken iOS 4.0.1 on iPhone 3G. There is no baseband update! So, you can use Ultrasn0w 0.93 to unlock.