A micropixel avalanche phototransistor for time of flight measurements