Deductions & credits

I receive a W2 and a 1099-misc from my employer and from another business that is tied into work done from my main employer.  The 1099misc contributes a small portion of my income but that income is generated from the office of my main employer.  Am I allowed to claim gas mileage to and from work since I receive a 1099-misc from work generates at my main employer  even though it is an additional company paying me as a contractor