It means a space that only contains the eternal, indivisible atoms mentioned in the previous phrase.
We cannot say that the atoms move through empty space, because the existence of the atoms means that it is not empty, meaning that the sentence would contradict itself. We could also phrase it as "eternal, indivisible atoms which move through a space that contains only the atoms", but that's a rather inelegant phrase.
Otherwise is here being used in its adverb form, which is defined as:
- in other respects; apart from that.
"an otherwise totally black cat with a single white whisker"
Otherwise in this case is being used to indicate an exception to a statement. Other examples might include:
"He threw a tantrum at lunchtime, but was otherwise well behaved" - someone, presumably a child, behaved well with the exception of a single incident at lunchtime.
"A single failure can ruin an otherwise exemplary record"
"Pool balls roll freely over an otherwise empty table"