Judge Martin Nolan ordered them to pay €3,000 each in the next year as a token of "material remorse" for the victim.
He said he had placed the men in custody last month for two weeks to give them a taste of prison.
The judge said the assault was unprovoked, but he said the two men had pleaded guilty and had a lack of previous convictions.
He suspended jail terms of three years for three years on the condition that they be of good behaviour for that time and pay the money over in the next year.
Fitzpatrick and O'Keefe had been out celebrating O'Keefe's 21st birthday when they saw Daniel Lambert escort a friend, who was feeling "the worse for wear", outside a nightclub.
Fitzpatrick approached the woman and told her she would be better off with him. Mr Lambert told Fitzpatrick to go away.
Fitzpatrick punched Mr Lambert, knocking him to the ground and he and O'Keefe continued to attack him while he lay there.
The pair ran off when the security men from the nightclub intervened and an ambulance was called for the victim, who was lying unconscious on the ground.
Garda Robert Griffin told Paul Carroll, prosecuting, that Mr Lambert was later treated in hospital for a broken finger, broken teeth, a cut above his eye and bruising to his cheek.
He has since had to undergo dental trteatment, which will have to be repeated every 10 years.
Fitzpatrick, of Oranmore Road, Ballyfermot, and O'Keefe, of Ballyfermot Drive, also in Ballyfermot, pleaded guilty at Dublin Circuit Criminal Court to assault causing harm in Temple Bar on July 18, 2010.
Neither have previous convictions and both had written a letter of apology to the court.
Judge Nolan said the men had attacked and beat Mr Lambert after getting "the wrong end of the stick".
He said their behaviour was "pretty reprehensible" but accepted that alcohol had "probably affected their judgment".
He accepted their pleas of guilty and the fact that "both will probably contribute to society in the future".