Can it be fair? Sure. But it usually isn't. Take Venezuela, run by Hugo Chavez. In a country that has a lot of oil revenue to spend, there is corruption in how contracts are awarded and funding is given - if you are a political supporter of the President. But he has been elected several times in what international observers say have been very fair and open elections.
But I would say that is the exception to the rule, and there is more often cheating in elections where the government is already beset by corruption.
This is hard to answer in the abstract. Of course the election can be free and fair if the corruption is just the "normal" sort of corruption where people have to bribe officials to get permits or things like that.
But elections cannot be free and fair if a country has a system where the government leaders control the counting of ballots and control who can be on the ballot and things like that. These things must be in the hands of an unelected authority that does not depend on the leaders.
I see that you are from Nigeria and it seems that this is the sort of thing that your president has been trying to fight by firing Maurice Iwu and by trying to set up an electoral commission where the president does not select the head of the commission and control the commission's funding.
Most certainly not.
A case in point is Sri Lanka. The incumbent president Mahinda Rajapaksa announced General Elections in November 2009 and used all sorts of corrupt methods to rig the elections and made sure that Sarath Fonseka who was responsible for freeing the country from the threat of the Tamil rebel leader Prabhakaran was defeated.
Not being satisfied with this, Rajapaksa had Fonseka arrested on trumped up charges of corruption!