When I do this, I tend to use something like:
Xfasta <- character(nrow(X) * 2)
Xfasta[c(TRUE, FALSE)] <- paste0(">", X$column1)
Xfasta[c(FALSE, TRUE)] <- X$column2
This creates an empty character vector, with length twice the length of your table; then puts the values from column1 in every second position starting at 1, and the values of column2 in every second position starting at 2.
then write using writeLines:
writeLines(Xfasta, "filename.fasta")
In this answer, I added a ">" to the headers since this is standard for fasta format and is required by some tools that take fasta input. If you don't care about adding the ">", then:
Xfasta <- character(nrow(X) * 2)
Xfasta[c(TRUE, FALSE)] <- X$column1
Xfasta[c(FALSE, TRUE)] <- X$column2
If you didn't read your file in with options to stop characters being read as factors, then you might need to use <- as.character(X$column1)
instead.
There are also a few tools available for this conversion, I think the Galaxy browser has an option for it.