Probing dark contents in globular clusters with timing effects of pulsar acceleration