No.
The same thing happens with companions (incidentally, this is half the reason I don't use one; the other half is the inane conversations). There's no real way to control them, other than give the treasure goblins a wider clearance than you otherwise would. The other solution is to simply use a different skill if you don't like the way your pet works out.
Regarding treasure goblins specifically, it is possible to herd them. If you can use vault or other skills to get onto the other side of them, you can push them back the way you have come and away from other enemies rather than chasing after them and pushing them deeper and deeper into more enemies which you will then need to kill. In single player at least (may not work as well in multiplayer) goblins will always run away from you, not your pets or companions.