I know the crafting rules say you have to spend gold to represent the cost of materials used in crafting something, but what about in a situation where you aren't in a city and can't reasonably just pay for materials? For example, if one were in a campaign where they were shipwrecked and stranded somewhere, but one party member had artisan's tools and ranks in craft arms and armor, could he be able to, say, melt down scrap metal of equal value to what he wants to make as the cost of his crafting attempt?
Yes, you can craft without spending gold.
The description of the craft skill does indeed include paying one third of the item's price for the cost of the raw materials. This is an abstraction, a simplification of the crafting, relieving players and the DM of the shopping for the multitude of different ingredients required for the process.
If one can not just pay for the needed raw materials but, from DM's viewpoint, has the raw materials in question available from other sources (scrapping the ship's remains, following the shipwreck example), it is perfectly fine to allow him to craft, since the essential part is having materials and tools on hand, not spending gold.
This should be possible. My suggestion to the DM would be to simply treat the raw materials salvaged as found treasure. You just happened to skip the intermediate step of hopping to town to sell it.