If you're a Python programmer you can use the Scapy interactive packet manipulation program to create your own packets and send them. You can also use it as a library within your own Python program.
From within the interactive program here's how you can create an IP packet, change the source address, and send it. Scapy will use any default routes you have setup.
>>> pkt = IP(src="1.2.3.4", dst="5.6.7.8")
>>> pkt.show()
###[ IP ]###
version= 4
ihl= None
tos= 0x0
len= None
id= 1
flags=
frag= 0
ttl= 64
proto= ip
chksum= None
src= 1.2.3.4
dst= 5.6.7.8
\options\
>>> pkt.send()
The fun thing about Scapy is that it creates the all lower layer headers for you if you don't specify them with default values. So in the above example the Ethernet header is created for you already. So you probably want to manipulate the TCP layer, so the following code will build upon the above example.
>>> ip_layer = IP(src="1.2.3.4", dst="5.6.7.8")
>>> tcp_layer = TCP()
>>> pkt = ip_layer/tcp_layer
>>> pkt.show()
###[ IP ]###
version= 4
ihl= None
tos= 0x0
len= None
id= 1
flags=
frag= 0
ttl= 64
proto= tcp
chksum= None
src= 1.2.3.4
dst= 5.6.7.8
\options\
###[ TCP ]###
sport= ftp_data
dport= http
seq= 0
ack= 0
dataofs= None
reserved= 0
flags= S
window= 8192
chksum= None
urgptr= 0
options= {}
As long as your routes are set up correctly to get to your destination you should be able to send the packet. Scapy will also be able to capture response and what not too if you needed. The documentation gives good simple examples, but does kind of lack in more advanced examples. The API isn't well documented but there is a doxygen version up here.