Traveling-wave photodetector with integrated light amplification