I've added a ArcGISDynamicMapServiceLayer and I've used the imageParameters.layerIds property to only show certain layers.
Is there a way to set a different opacity level for each layer?
in general, you only get access to the symbology/opacity defined in the service itself. that being said, dynamic layers capability added at 10.1 provides an opportunity to define an entirely new renderer on the clientside for ArcGISDynamicMapServices...
Here's a link to the ArcGIS Server help for configuring map services with dynamic layer support: http://resources.arcgis.com/en/help/main/10.2/#/About_dynamic_layers/0154000004zv000000/