First do this
With the phone connected to iTunes, click on the phone's name in the left pane of iTunes. Across the top of the main window is a list of tabs - Summary, Info, Apps etc.
Click on the one called Info - you'll see a box marked Sync Address Book Contacts. Check it. Then hit the Sync button at the bottom right of the main window of iTunes.
Then do this:
Sync the phone to the Mac Address Book. That way you have *all* the contacts, duplicates and all, on the Mac.
Open Address Book on the Mac and do Card, Look for Duplicates. Then merge all the dupes.
You might have to do some manual checking after the merge, because you might find some duplicated data on some of the cards, where Address Book hasn't been able to see that it's the same. But it reduces the work a lot.
Open iTunes; in Preferences, Devices, check the box that says Prevent iTunes from Syncing Automatically. This is to make sure the next step works
Then connect the phone, set iTunes to overwrite the phone's address book with the mac's (info tab in iTunes) and sync. After that, you can uncheck the automatic sync prevention box