Can I use an IRA to save for retirement while working as a contractor overseas?

You are not allowed to contribute income that has been excluded under the Foreign Earned Income Exclusion to an IRA. So, if you have excluded all of your income under the FEIE then you may not contribute to an IRA. If you already have, then you will have made an excess contribution that will need to be withdrawn. If you have income that was not excluded under the FEIE then you can contribute to an IRA, subject to the income restrictions for the specific type of IRA.