We present the results of a wide-field spectroscopic analysis of the galaxy population of the massive cluster MACSJ0717.5+3745 and the surrounding filamentary structure (z=0.55), as part of our systematic study of the 12 most distant clusters in the MACS sample. Of 1368 galaxies spectroscopically observed in this field, 563 are identified as cluster members; of those, 203 are classified as emission-line galaxies, 260 as absorption-line galaxies, and 17 as E+A galaxies (defined by $frac{H_{delta}+H_{gamma}}{2}>6$AA and no detection of [OII] and $H_{beta}$ in emission). The variation of the fraction of emission- and absorption-line galaxies as a function of local projected galaxy density confirms the well-known morphology-density relation, and becomes flat at projected galaxy densities less than $sim 20Mpc^{-2}. Interestingly, 16 out of 17 E+A galaxies lie (in projection) within the ram-pressure stripping radius around the cluster core, which we take to be direct evidence of ram-pressure stripping being the primary mechanism that terminates star-formation in the E+A population of galaxy clusters. This conclusion is supported by the rarity of E+A galaxies in the filament which rules out galaxy mergers as the dominant driver of evolution for E+A galaxies in clusters. In addition, we find the 42 e(a) and 27 e(b) member galaxies, i.e., the dusty-starburst and starburst galaxies respectively, to be spread out across almost the entire study area. Their spatial distribution, which shows a strong preference for the filament region, suggests that starbursts are triggered in relatively low-density environments as galaxies are accreted from the field population.