Prisoners are being held in solitary confinement for long periods, according to a human rights expert.