The department of transportation is authorized to enter into and make such contracts as may be deemed advisable by the department, with county officials charged by law to work workhouse prisoners in the construction or reconstruction of roads and to compensate such counties by allowing credit to the county in cooperating in the construction or reconstruction of roads with the department, for the state or federal government, upon such terms as may be approved by the appropriate department of the government of the United States and the Tennessee department of transportation.