Remove Facebook and Gmail contacts
On Contacts tab of stock contacts app, hit Options button. Then, choose more ~> Display Options.

On this screen, un-check Only contacts with phone numbers. Then, check all accounts whose contacts you want to delete (like Facebook, all Gmail groups). And, un-check all accounts whose contacts you don't want to delete (like Phone, SIM). Tap Save button after you finished checking and un-checking.

On Contacts tab, hit Options button again. Choose Delete this time. On next screen, tap Select all and then Delete button. Done!

After this, again go to display options to display your contacts which weren't deleted.