I think it would be incorrect to say that Amir was afraid to be Hassan's true friend. It would be more accurate to say that during their childhood, Amir was incapable of being his friend, for several reasons. First of all, Amir and Hassan were separated by social class. No matter how much Amir enjoyed Hassan's company, he was never unaware of Hassan's lower class; he never related to Hassan as his equal because he was not; Hassan was a servant in Baba's house, specifically a servant to Amir. Hassan's social ostracism made Amir feel superior, at least superficially, since he actually felt very inferior. He often lorded his superiority over Hassan to make himself feel better.
Amir was not capable of friendship because of these deep feelings of inferiority, the result of his troubled relationship with Baba. He was completely self-centered; he felt no empathy for Hassan. He recognized Hassan's complete devotion, but he did not value it. When he had to choose between Hassan's safety and his own, he deserted him. When Hassan's presence intensified his own guilt, he lied, forcing Hassan out of his home. Amir's psychological conflicts and pain made it impossible for him to be Hassan's friend.
It is only as an adult, having gained understanding of himself and his behavior, that Amir can honor Hassan's friendship by returning to Afghanistan, risking his life to rescue Hassan's son, Sohrab, and then bringing the boy home to give him a good life. Amir becomes Hassan's true friend after Hassan's death.