Transition radiation measurements with a Si and a GaAs pixel sensor on a Timepix3 chip