A necessary and sufficient condition for the asymptotic tightness of the Shannon lower bound