Yes, it's fine. Story points are abstract units. They may be related or derived from real units, but it's not important what units, as long as all of the stories use the same units. Since the number of units of work allowed into an iteration is based on the number of units of work completed in the past, the units must be consistent.
Here's an example: Suppose that we tend to overestimate, on average, taking half the time to do a task as we estimated. In the last week-sized iteration we estimated 10 days worth of work but took five actual days to do them. Since past performance is 10 estimated days, we allow 10 estimated days into the next iteration. As long as our estimates are consistently bad, it all works out. That's why the actual units don't matter.