Coronavirus poses an “acute” risk in prisons, many of which are overcrowded, the justice secretary says.