You can do this at the very start of the game when you first meet Jacob. He will explain that he is a biotic and can use his pull ability on enemies. The robots will keep coming through the door until you request his ability so you can keep pulling off headshots until the achievement unlocks or you run out of ammo.
If you miss this infinite loop use the sniper rifle or heavy pistol and pick off enemies from a distance. This is easiest to do on LOKI mechs, as they have low health and lack sufficient protection.