DPG method with optimal test functions for a transmission problem