Yes, but it has to be integrated in the firmware. ST generally provides 'DFU' libraries that performs dynamic programming. The principle is to keep within one sector the DFU management, and the application within the rest of the FLASH. With a CortexM3, the relocation of the interrupt vectors makes easier the mechanism. For reprogramming, USB is generally used by you can also use any other communication port.