Pseudoscalar decay constants of kaon and D-mesons from $N_f=2$ twisted mass Lattice QCD