They can be stained walnut but would have to be sanded at least lightly to provide a key AFAIK.
They will not look great IMO as the grain will show clearly that they are pine. I have some refinished pine floors that are stained walnut, they had to be stained dark as when they were sanded (professionally) right back, they proved to have some patches of staining going right through them that would have looked bad with a natural stain. So they got stained walnut to disguise that, which looks OKish but is clearly not walnut timber. Not such a big deal on bedroom floors, but would not like it on a door, esp not a downstairs one. Would look horrible beside real walnut flooring IMO.