The question "What is the basis of morality?" is obviously an extremely difficult one, and it can sometimes seem as if there are as many answers to that question as there are philosophers who have thought about it. Or maybe more. But I take it that the questioner's central worry is whether there is any real possibility that law might not "derive its power...from some kind of (religious?) moral basis". And that is quite a different matter.
There are, I think, two important things to say about this. First, it's not at all clear that religion is capable of providing the kind of basis for morality that is sought. This is often regarded as one of the central points of Plato's great dialogue Euthyphro. There, Socrates poses the question, whether what is good is good because the Gods will it, or whether the Gods will what is good because it is good. And his point is that neither answer is very happy. If what is "good" is good only because the Gods will it, then even torturing babies for fun would be good if the Gods had happened to will it, and what they will, on this view, is not constrained by any prior moral facts. So what is good ends up being kind of arbitrary, and the view of radical Islamists, say, that blowing up the World Trade Center was good becomes perfectly comprehensible. It's just a view about what the Gods will. But if the Gods will what is good because it is good, and presumably because they recognize its goodness, then what is good is independent of what the Gods will, and religion provides no basis for morality. You might find out what is good by finding out what the Gods will, but there might just as well be other ways, too, since what is good comes first, and what the Gods will comes second.
Now, as the questioner rightly notes, it needn't really be religion that provides a basis for morality. And what is at issue here needn't even be what the basis for morality is, in some fundamental sense. The worry might be, more fundamentally, that people's moral views are thoroughly tied up with their relatively individual points of view---their religious beliefs, in some very broad sense---and it is hard to see how law can get by wholly independently of morality. This question, I take it, could also be put this way: How can questions about political justice be independent of questions about morality? And if we think the latter is tied up with religion and the like, doesn't political justice too become tied up with religion and the like? Well, I can't answer that question. What I can say is that it is, in many ways, the question that has animated "liberal" political theory since John Locke---and here "liberal" just means: fundamentally concerned with individual freedom (which is what Liberals too are fundamentally concerned with, whatever you may hear from O'Reilly and the like). It is very explicitly the central concern of John Rawls's second great book, Political Liberalism. So if you really want to come to grips with that question, you might start with Locke's Two Treatises on Civil Government and Letter on Toleration, continue with Rousseau's Social Contract, and then have a look at Rawls's Theory of Justice and Political Liberalism.