IC wise the idea of the guards paying for goblin ears is rather shakey morally. By doing this quest you're basically being a hired hitman.
OOC wise I don't think theres anything wrong with it if, as forgottencreature said, its done in an RP fashion. Also note, that paying more for the ears than the quartermaster pays out is somewhat bad RP as the only tangible benefit (benefit your character sees) is the gold that he gives out. Paying more than he pays out is aknowledging that fufilling the quest gives XP as well, something your character should be unaware of.