Is it possible to command Quadcopter using Pixhawk to go to relative co-ordinates using optical flow.
Yes. I think there are various ways to do it. E.g. offboard mode, sending local position target mavlink message.
Offboard velocity control is supported. Local position control is in the works, see: https://github.com/dronecore/DroneCore/pull/260