Eighteen-year-olds will be allowed to drive trains due to concerns over labour shortages, the Department for Transport (DfT) has announced.