I assume you mean you are going to download a third party firmware, like OpenWRT and then want to reload the original linksys firmware.
The answer to that is yes you can reload the original firmware. But the only way to do it is if you have a binary copy of that exact firmware. At the very least, you can download the latest stock firmware from the
Linksys site. Make sure you download for the correct version of the WRT54G or you might brick your router. Then you should be able to use the web interface firmware update to load the downloaded firmware.