COLLAPSE OF MOLECULAR CLOUD CORES WITH RADIATION TRANSFER: FORMATION OF MASSIVE STARS BY ACCRETION