GraphHopper Api Explorer

Is it possible in GraphHopper Api Explorer to set a route only along streets where there are tram tracks?

No, this is not possible. But you could probably implement something like this within the open source project.