You can but, IMHO, it's probably not a good deal in most cases.
I'm not saying I'm an expert but, whenever you buy additional credit with the Calpers retirement system, you often have to pay not only your share as an employee but, also, the state's share which makes it very expensive.
For example, my husband is a state employee (although not under corrections) and he pays about $215 a month for his retirement benefits. But, the state kicks in another $820 for their share of the benefits.
When you buy service credit, you basically have to pay for both parts including the state's share or more than $1,000 a month.
That's why, for example, buying credit for my husband's 33 months of service as a marine would cost us a lump sum of $22K under his retirement plan ... and that's without interest. If you bought the credit under a payment plan with interest, it would cost even more.
Even with just the lump sum, it would take us at least six years of retirement to get that money back in his pension. And, when you consider the interest you would earn by putting that $22K in a 401K instead, it would probably take 12 years to get the money back in pension payments.
When we've looked at Calpers service purchase options in general, we've figured it would be better to put that cash in the 401K and earn interest on it since, it would take so long to get that money back in pension payments.
Afterall, you could be dead by the time you got the money back, and you might need the cash before then.