Cops will be able to spend time in jail or prison depending on how serious the crime is against them. The max time a cop can spend incarcerated is 45 minutes. It may seem like a long time but its really not when you consider selling illegal items to civilians and terrorists. I.A. is in charge of doing undercover work to catch cops doing illegal things even if its just speeding.
If a cop does end up spending time in jail or even prison the punishment doesn't end there. Cops can lose ranks and even pay per minute for such serious crime. If a cop gets sent to jail then their pay will get a minor cut, if they go to prison they can lose a rank and get a pay cut. The only way to regain pay or rank is doing legit anti-crime work.