Radiative transfer in dust clouds – IV. Circumstellar dust shells around carbon stars