Section 55. A company, organized, or in process of organization, under the laws of the commonwealth, having first obtained the approval of the board of aldermen of the city or of the selectmen of the town where private land is situated to the construction of its railway thereon, may, for the purpose of avoiding grades and curves in public ways, and for such other purposes incidental to the use of such ways, as the department may in the manner hereinafter provided approve, petition the department for authority to construct and maintain parts of its railway or extension thereof upon such private land outside the limits of such ways. The company in such petition shall set forth the purpose for which such authority is desired in each case, and shall file with the petition a plan, in such form and upon such scale as the department prescribes, of the railway or extension, and of the localities where it is desired to construct the same upon private land, and the department, after public notice and a hearing, if satisfied that public necessity and convenience demand that parts of the railway or extension should be built outside the limits of such ways, substantially on the private land selected, and that the approval of the board of aldermen or the selectmen of the city or town where the land is situated has been obtained as aforesaid, may authorize the petitioner to construct and operate its railway or extension upon and over private land, and for that purpose to purchase or lease private land or rights therein and thereover, in such cases and to such extent as the department deems public necessity and convenience in the construction and operation of the railway or extension require. The department in granting such authority may determine the kind of construction to be used, the grade and alignment of the tracks, and may order such special appliances to be furnished and such safeguards to be adopted in the construction and operation of the railway or extension upon private land as it deems public necessity, convenience and safety demand.