Can a US pilot fly a German D-xxxx aircraft in Germany?
No. A US licenced pilot can not fly a German registered aircraft in Germany. 

Generally you must always have a pilot licence issued by the state that the aircraft is registered in.

Obtaining a licence for that country can be relatively easy based on the fact you already have a licence from another country, but you will need a new licence or some kind of documentation issued by the governing country. 

There is an FAA rule that allows a US licenced pilot to fly a foreign registered aircraft the USA, but I think this is rather unique as I believe no other country allows this.