We calculate the single transverse-spin asymmetry for open charm production in $pp$ collisions within the QCD collinear factorization approach. We include contributions from both twist-three quark-gluon and tri-gluon correlation functions. We find that the quark-gluon correlation functions alone generate only a very small asymmetry for open charm production in the kinematic region of current interest at RHIC, so that the observation of any significant single-spin asymmetry would be a clear indication of the presence of tri-gluon correlations inside a polarized proton. We furthermore demonstrate that the tri-gluon contribution could be very different for the production of $D$ and $bar{D}$ mesons. These features make the single spin asymmetry in open charm production in polarized $pp$ collisions at RHIC an excellent probe of tri-gluon correlation functions.