Silly question. The answer is of course yes - it just hasn't been done yet, probably because there is virtually no need. Of course it would take a huge amount of programming etc to make it happen, but that isn't the question - we know that the required programming could be done.
As an alternative - could a human be flown better by a human or a computer? We all know the answer is the latter - a human cannot stand a chance. If they were to try, they'd have to have so many input systems for so many variables that it just simply would not be possible to control them all, let alone react.
An F1 car is the same. If the computer was to have a go, why on earth would it have a wheel to steer?