Yes - that's possible. All you'll need if a few new Dialogue entries and conditions on them. I'll explain that though, because it sounds complicated (well, it might):
Get to the Quest window (Character>Quests... if you didn't know), and then to Generic... You'll see that all of these have a Race after them, or something to do with speech (The one just named Generic is part of a quest, I think). Although they're quests, they house all of the Dialogue in the game related to race and current events.
Click on one of them, then go to Conversations. This is shows (for the race ones, excluding Dremora) the 'HELLO' conversation, which is what they say on you passing them. You'll see on each that the quest only applies to that certain race, due to a condition on the Quest Data tab (GetIsRace - [RaceName] - == - 1). This checks to see that those bits of conversation are only used for that race.
I reckon that's what you needed to know, but if you wanted to know more about dialogue, then you could read http://cs.elderscrolls.com/constwiki/index.php/Category%3a%44ialogue, or just scour the wiki. Good luck!

EDIT: Just re-read it, and it seems a little patronising, but that's only because I don't know how much you already know about the Dialogue settings. Sorry!