Low latency optical-based mode tracking with machine learning deployed on FPGAs on a tokamak