i remember asking this at an info session and the answer I got was that MIT considers these on a case-by-case basis. They'll want to compare the syllabus of the course you took to the syllabus of the course they offer. If they're similar enough and you did well, they accept it.
In many cases, even if MIT will not accept transfer credit, a student can earn credit by passing an advanced standing exam for the MIT class for which he/she wishes to obtain credit (info here).