Fast and Safe Trajectory Optimization for Autonomous Mobile Robots using Reachability Analysis