Six-dimensional weak-strong simulation of head-on beam-beam compensation in the Relativistic Heavy Ion Collider