As Frank Serpico found out, you may not be able to combine the two. Because justice and serving the public was very important to Serpico, his fellow NYPD officers made him pay a terrible price. In his own words in a 2014 article, "The Police Are Still Out of Control, I should know (http://www.politico.com/magazine/story/2014/10/the-police-are-still-out-of-control-112160#.VIW-_■■■_8M):
“Even now, I do not know for certain why I was left trapped in that door by my fellow police officers. But the Narcotics division was rotten to the core, with many guys taking money from the very drug dealers they were supposed to bust. I had refused to take bribes and had testified against my fellow officers. Police make up a peculiar subculture in society. More often than not they have their own moral code of behavior, an “us against them” attitude, enforced by a Blue Wall of Silence. It’s their version of the Mafia’s omerta. Speak out, and you’re no longer “one of us.” You’re one of “them.” And as James Fyfe, a nationally recognized expert on the use of force, wrote in his 1993 book about this issue, Above The Law, officers who break the code sometimes won’t be helped in emergency situations, as I wasn’t.”
Be prepared now for not being able to have both the pursuit of justice/serving the public and the goodwill of fellow officers.