That's a really interesting question. Everything I'm about to say is strictly 'in my opinion' (so please don't present it to a GM as official ruling, I in no way work for Paizo, have any Pathfinder authority, etc.; I'm just a fellow player)... but I think we can find how this works by looking at some key lines in Dominate Person's rules text. Of course, Drejk is presenting interesting points that contradict mine... so this could go either way. To get started:
"You can control the actions of any humanoid creature through a telepathic link that you establish with the subject's mind."
"Once you have given a dominated creature a command, it continues to attempt to carry out that command to the exclusion of all other activities except those necessary for day-to-day survival (such as sleeping, eating, and so forth). Because of this limited range of activity, a Sense Motive check against DC 15 (rather than DC 25) can determine that the subject's behavior is being influenced by an enchantment effect (see the Sense Motive skill description)."
"Subjects resist this control, and any subject forced to take actions against its nature receives a new saving throw with a +2 bonus. Obviously self-destructive orders are not carried out."
These three citations give us a framework to understand what Dominate Person does. It is clear they basically behave akin to an AI figuring out how to accomplish the assigned task and does so pretty much obsessively beyond basic self-maintenance. The Dominator is clearly overriding how the person's mind normally works.
The question from there is "what happens when the dominated creature is subject to a Fear effect it fails its save against?" You can interpret it several ways.
1 - Creature starts to run, but Dominator can override it immediately after the creature's turn provided doing so is not obviously self-destructive.
2 - Dominated (dominatee? Hmm) creature ignores the Fear because it isn't relevant to the orders it has.
3 - Dominated creature gets a new save at a +2 bonus, because failing to flee when it's under Fear effects is "against its nature."
4 - Dominated creature must assess whether the origin of the fear is suicidal to stand against. If deemed so, caster cannot override it. Dominated creature flees from the source of the Fear, then resumes its mission once able to do so. If not deemed suicidal, dominated creature either tries to defeat the source of the Fear or avoid it anyway and carry on with its mission.
My personal interpretation would be something like item 4, "Dominated creature assesses source of Fear to determine if opposing it, avoiding it, or ignoring it constitute self-destruction and behaves in the best interest of completing its assigned mission. It is essentially a case-by-case basis. Chances are the Fear penalties would not apply though because the creature's normal mental functions are being overridden by the Dominate effect."
Good question, though. I am curious to see how Paizo staff rule on this.
Had a similar question come up last game when our party (only 2 gestalt PCs and their familiars) got hit w/ an AoE panick effect. The 2 familiars and my ally all failed, only my character passed his will save. He had nothing to remove the fear, but he had Command and Greater Command, so I asked if the list was exclusive or inclusive, such that "stand and fight" could be one and force them to do so against their will. DM decided the list of options was exclusive so the 2nd question of compulsion vs. fear never came up, but it's interested me ever since.
(In the game, I ended up grappling my familiar and shoving him in my handy haversack, then moved up to the afraid ally and kept tripping him when he tried to run away till the fear wore off. His familiar could fly so even if I had more AoOs, I had no real way to stop it. :) "When all you've got is a hammer," heh heh)
Drejk is correct. Domination doesn't give immunity to any type of condition. Just like it doesn't stop you from being turned to stone, it doesn't stop you from being panicked. Once the fear runs out, you are still dominated of course.
This is not RAW, but if GMing, I would allow the caster a Charisma check against the fear DC to override the fear.
I want to add that a fear effect by definition prevents reasoning. So I think a creature would see ignoring its fear as obviously suicidal. If it did not think that, it would not be running in the first place.