We present the results of a lattice QCD calculation of the average up-down and strange quark masses and of the light meson pseudoscalar decay constants with N f = 2 dynamical fermions. The simulation is carried out at a single value of the lattice spacing with the twisted mass fermionic action at maximal twist, which guarantees automatic O(a)-improvement of the physical quantities. Quark masses are renormalized by implementing the non perturbative RI-MOM renormalization procedure. Our results for the light quark masses are m MS ud (2 GeV) = 3.85 ± 0.12 ± 0.40 MeV, m MS s (2 GeV) = 105±3±9 MeV and m s /m ud = 27.3±0.3±1.2. We also obtain f K = 161.7±1.2±3.1 MeV and the ratio f K /f π = 1.227±0.009±0.024. From this ratio, by using the experimental determination of Γ(K → µν µ (γ))/Γ(π → µν µ (γ)) and the average value of |V ud | from nuclear beta decays, we obtain |V us | = 0.2192(5)(45), in agreement with the determination from K l3 decays and the unitarity constraint.