The present study is aimed to maximize biodiesel production by using the fungal strain Ras101 as a feedstock. Response surface methodology was used to relate the interaction between some nutritional and environmental factors affecting the lipid productivity by Ras101. By applying LINGO optimization program, the maximum lipid production of 40% dry biomass of this fungal isolate has been attained in a fermentation medium composed of 50 g/l glucose, 1 g/l nitrates, 1.5 g/l phosphorous, and 0.5 g/l NaCl. This medium was adjusted at pH of 6, and incubated at 28 °C for 7 days. The values of correlation errors between the experimental and estimated values are less than 1%; this proves that the proposed correlation could be used effectively for estimating the fungal lipid production. Consequently, the effects of time and temperature on the amount of biodiesel produced in the extraction and transesterification one-step process have been investigated. The maximum biodiesel production of 28% dry biomass (80% lipid) has been achieved in the transesterification process at 70 °C for 30 min. Additionally, it is found that the combination of glucose, nitrogen and phosphorous contents has a positive influence on lipid production in the fungal biomass. The density, kinematic viscosity, water content and calorific value of the produced biodiesel were 800 kg/m, 2.8 mm/s, 66 ppm and 10122 kcal/kg, respectively that matched well with biodiesel and fossil standard specifications.