Cities and towns may make agreements with railroad corporations in regard to the kind of material, form of construction and payment of the cost of the wearing surface of bridges and approaches over or under a public way, wherever the railroad company is required by law to maintain such surface.
Mass. Gen. Laws ch. 160, § 99