There's probably a neater way to do it but you could just serialize the date into a string like so:
Datetime oneyearago = System.today().addDays(-365);
String jsonDatetime = JSON.serialize(oneyearago);
Which outputs the specified date in the correct format:
2015-01-06T00:00:00.000Z
In response to your comment:
String OppJSON = '{"attributes":{"type":"Opportunity","url":"/services/data/v25.0/sobjects/Opportunity/500E0000002nH2fIAE"},"Id":"500E0000002nH2fIAE","LastModifiedDate":"'' + jsonDatetime + '"'}';
Opportunity opp = (Opportunity) JSON.deserialize(OppJSON, Opportunity.class );
Basically just replace the hardcoded valueUpdated with the variable.
P.S. There may a formatting issue therestring that works correctly, but really you get the ideashould look into crop1645's approach as that is more aligned with unit testing best practices.