Every city and town may by ordinance regulate and license the riding of bicycles and other similar vehicles upon or along the streets, alleys, highways, or other public grounds within its limits and may construct and maintain bicycle paths or roadways within or outside of and beyond its limits leading to or from the city or town. The city or town may provide by ordinance for reasonable fines and penalties for violation of the ordinance.