Yes, it's fine. However, over time, this will increase the wear-and-tear on your battery so if you plan on staying plugged in for a long time, it might be better to simply remove the battery and run solely on AC power.
An important thing to note is that you should have a reliable AC supply before you do this, or else you might lose all your work if you lose power.