I don't think the iPhone has the ability to write contacts to the SIM card, only read them off.
If you have another phone that can sync contacts to both the computer and the SIM card, you can first sync the contacts back to your computer on the iPhone, then put the SIM card in another phone, sync the contacts to that phone, and then store them on the SIM card.