Can I update my 4.0b iphone to 4.0.1, and not to 4.1? I am looking for a way to update my iPhone 3Gs to 4.0.1, and not to 4.1 so that I can jailbreak.

Can anyone help?

EDIT - I have now tried, and failed on two seperate machnines  to restore from DFU mode to 4.0.1 The device is has 4 beta on it.
You can go to this website and download the correct firmware file to your computer. From there, plug your iPhone into your computer and shift-click (Windows) or option-click (Mac) the "Restore" button. From there, choose the firmware file your downloaded.