With a dynamic map service layer, you cannot specify opacity for individual layers. You can specify visible layers and queries on individual layers but you can only set opacity for the entire map service.
One solution could be :
If you have some particular layer in map service for which you want to add transparency, add it as a feature layer. Since you can control the transparency of feature layer.