Section 51. The fees and expenses of officers, other than those named in section fifty, in a criminal case, shall be paid by the commonwealth.