To be egocentric is to be concerned with one's own welfare. To be altruistic is to be concerned with the welfare of others. Lets look at both sides, then you can make a case based on your own reading.
Dimmesdale says he is remaining silent because he is the leader of the community. People look up to him, and he fears that their faith in God may be hurt by discovery that God's representative is flawed. This is in a time influenced by Calvinism and predestination, the belief that it has already been decided if a person is going to heaven or hell before that person is even born. If Dimmesdale is behaving in a way that is sinful, perhaps he was destined for Satan. He begs Hester to reveal his name, but he will not himself because of these reasons. He is obviously suffering, and he knows what will relieve his suffering. He does not, suggesting he is altruistic.
However, Dimmesdale is scared. He stands upon the scaffold at night, terrified. He sees the A in the sky and it puts fear in his heart. This suggests that he knows he should confess but that he is too cowardly to do it. After his encounter with Hester in the forest, he comes into town wanting to shock and even defile his townspeople. He agrees with Hester to abandon his town and people, without having confessed. All this suggests he is most concerned with his own welfare and just too scared to own up to his faults.