I was just thinking about Harley Quinn and how she works in Arkham Asylum and it got me wondering, what type of psychologist works with criminals (like gives them therapy) who suffer from a mental health disorder at a maximum security mental hospital/asylum. An example would be I work Has a -type- psychologist at Arkham Asykum which is a maximum security mental hospital.
I'm going to elevate my earlier comment and offer as a definitive answer the term Forensic Psychologist, which Psychology Today defines this way:
Forensic psychologists are most commonly licensed psychologists who specialize in applying psychological knowledge to legal matters, both in the criminal and civil arenas.
See the article here.
(Telephoning a family member who does this sort of work confirmed my earlier theory: "What are you, anyway?" "Officially, I'm a forensic psychologist." (Bada boom.) )
It seems like "prison psychologist" is a term that might be what you're looking for.