Make sure your contacts are all Google contacts. (If not, export them to the SD card, then import them to your Google account.)
They should all show up at
Google Contacts. Click on Find duplicates. When you get them cleared up there, they'll sync back to your phone without the duplicates.