yes, why not? a true pianist should go through everything - you can't call yourself a pianist or a musician if you've never played bach, or mozart, or haydn, or beethoven, or... (etc.)
but, once you've tried, did your best playing all kind of works belonging to all kinds of periods, and everything, and you find that temperamentally and psychologically you could never play (say) chopin as well as you play bach, i think you should stick at doing what makes you feel right.
actually, there are very few pianists who can play "anything", and they are the greatest (richter, horowitz, michelangeli, radu lupu, lipatti).