Tailoring the optical properties of 2D transition metal dichalcogenides by strain