No, you do not need a certificate of occupancy to close.
A certificate of occupancy is only needed to occupy a dwelling. Occupy includes moving in personal belongings even if you are not physically moving in. However, there may be instances, depending on the violation(s) found in the initial inspection, where the Housing Office would approve moving in personal belongings.
However, the mortgage company and/or the buyer may choose not to close without the certificate of occupancy.