Section 10A. Selectmen in towns, and the aldermen or other board or officer having charge of ways in cities, may by regulation designate certain ways or parts of ways, other than state highways, upon which and the hours during which coasting may be permitted and may in like manner regulate the use of such ways by vehicles during such hours.