Certainly it's possible. Basic composition isn't even all that hard. However, it would be a good idea to have at least a certain amount of theory and understanding of forms and so on before leaping in. There are a number of ways to learn that; it's quite possible that your current teacher might be able to help a lot.
Mind you, this isn't so that you will then compose in a certain style, or in the fashion of a certain era. There's no real reason why you should; if you do decide to compose, it should be your own voice. However, it does help to know some of the basics, and why and how some things work and some things just don't seem to!
As others have pointed out, though -- the better you can play piano (or some other keyboard!) the happier you will be, as then your compositional ideas won't be limited by your ability to try them out.