Section 48. In cases in which municipal courts in Boston are authorized to sentence to imprisonment in the house of correction or county jail, or to commit thereto for nonpayment of fine, they may sentence to imprisonment in the house of correction at Deer island or commit thereto.