Today at a client I had the need to modify the code that RIA Services generates. It is certainly possible, but not as easy as modifying a T4 template. It turns out you have to derive a class from System.ServiceModel.DomainServices.Server.CodeProcessor. If you put the DomainIdentifierAttribute on your DomainService class, you can specify your own CodeProcessor.
The CodeProcessor gets an tree with the CodeDOM of the code that is going to be generated. The MSBuild task responsible for generating the code, hands that to your CodeProcessor so you can add, remove or change anything you want. See an example of a CodeProcessor here.
I’ve read somewhere that the next version of RIA Services is going to support T4 Templates, but for now I can live with it.