Im sure that you cant unless you make a mod to do so.
Your only opetion to get rid of a unit is to deconstruct it, but that wont give you experience points.
This is where pirates help, they will level your ships up faster. But i assume that oyu know this already.
EDIT:
If you could attack your own structures, i cant see how that would br profitable at lower levels as it would be a lot cheaper to buy a level for your ship, then making structures to blow up.
At high levels where money is not an issue, i can see how this could be useful, but then why not just get a larger fleet. But this doesn't give you an answer to your question.