All costs taxed by courts in criminal prosecutions, which by law any city or town is or may be required to pay, may be paid by the clerk to the several persons entitled to them, out of fines in his or her hands belonging to the city or town; provided, that fines received by the clerk which are by law to be applied to the support of the public schools shall not be used in the payment of these costs.
R.I. Gen. Laws § 12-21-12