Can an online friend, who knows my character very well, write a peer recommendation? I contacted the MIT office, they said that I can submit a peer letter as a supplemental one, but can online "peers" count as valid recommenders?
Online peers can be valid recommenders for the purposes of college admission, but whether or not they'll be considered seriously by the school you're applying to depends on these three factors:
1. How well does the recommender know you? The better the person knows you, the better impact the recommendation will have. Someone you've chatted back and forth with on a forum a couple of times won't be able to add much to your application, whereas someone you know quite well (which it sounds like you do) can be an asset. 2. How long has the recommender known you? The longer the person has known you, the better impact the recommendation will have. Someone you've known for years is a better bet than someone you just started talking to a couple of months ago. 3. In what capacity does the recommender know you? The more professional or academic the capacity, the better impact the recommendation will have. For instance, someone you met while doing some kind of online volunteering (like transcribing documents for the Smithsonian, or doing grassroots activism) or work is more likely to lead to a favorable result than someone who just knows you from hanging out on the same livestreams of video games.
These three points are important for non-online recommenders as well, of course. However, when it comes to recommendations by online peers, admissions officers are likely to weigh the second and third factors more heavily than the first. Among many people, there is still a general feeling that online discussions and friendships are automatically less close than in-person interactions, so admissions officers may look to how long the recommender has known you and in what capacity the recommender knows you as a way to support the recommender's claims of knowing your character well.
This is not to say that you absolutely cannot use a peer reference who you met, for instance, playing World of Warcraft only six months ago, but the recommender will need to overcome a higher barrier of credibility than a teacher who's had you in class four days a week for six months (even if you spend more time on WoW than in that class). This article on sample character reference letters provides many great examples of how that is possible, but a key takeaway is that the recommender should mention specific ways in which she has seen you achieve or be of high character, rather than confining herself to general statements.