Police cells will be used again to hold prisoners as jails are running at “close to critical capacity” of more than 99%, the Justice Secretary has said.