Optimization problems involving the first Dirichlet eigenvalue and the torsional rigidity