Yes, it can be done. It would take quite a load of work to first find the correct speakers with similar dimensions and then dismantle the iphone and replace it and making sure that it works! You're better off just using external speakers or a dock! The quality difference would be too small to actually bother.
The internal speaker is based on a plastic chamber located at the back of it improving the sound quality. If you change only the speaker,without any change of the chamber, the result may be no mentional.Redes