In my past experience this condition has been caused by a loose steering stem. Torque it back to stock specs and you should get major improvement in the tracking.
Other causes I've seen are bad swingarm bearings, degraded rear shock bushings, and one or both bad tires.
Good luck...I'd try adjusting the steering stem torque and go from there.